package com.ml.ws.config;

import java.util.concurrent.ConcurrentHashMap;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.ml.ws.model.RequestParam;

import io.netty.channel.Channel;

/**
 *  @author: Mr.D
 *  @Date: 2020/8/10 16:05
 *  @Description:
 *  <p>
 *       ws配置类
 *  </p>
 */
@Configuration
public class WebSocketConfiguration {
	//记录所有订阅者
    @Bean
    public ConcurrentHashMap<Channel, Integer> topicMap() {
        return new ConcurrentHashMap<Channel, Integer>();
    }
    //记录深度订阅者
    @Bean
    public ConcurrentHashMap<Channel, RequestParam> depthMap() {
        return new ConcurrentHashMap<Channel, RequestParam>();
    }
    //记录K线订阅者
    @Bean
    public ConcurrentHashMap<Channel, RequestParam> klineMap() {
        return new ConcurrentHashMap<Channel, RequestParam>();
    }
    //记录成交订阅者
    @Bean
    public ConcurrentHashMap<Channel, RequestParam> tradeMap() {
        return new ConcurrentHashMap<Channel, RequestParam>();
    }
    //记录市场快照订阅者
    @Bean
    public ConcurrentHashMap<Channel, RequestParam> detailMap() {
        return new ConcurrentHashMap<Channel, RequestParam>();
    }

}
